home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Cando v1.6 disk 1.adf / Install-ToFloppy20 < prev    next >
Text File  |  1992-01-28  |  13KB  |  483 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        Install-ToFloppy20
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        The Commodore Installer Script for updating CanDo 1.6 disk to 2.0
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Eddie Churchill, c/o INOVAtronics, Inc.
  10. ;*************************************************************************
  11. ;    Still to do:
  12. ;*************************************************************************
  13. ;    History:
  14. ;        14:26:05 CST, 27 Jan 1992
  15. ;            Finished
  16. ;        21:45:12 CST, 21 Jan 1992
  17. ;            Created from Install-CanDo
  18. ;*************************************************************************
  19.  
  20.  
  21. ;******************************************************
  22. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  23. ;******************************************************
  24.  
  25. ; some useful variables
  26.     (set true 1)
  27.     (set false 0)
  28.     (set on true)
  29.     (set off false)
  30.     (set yes true)
  31.     (set no false)
  32.     (set yep yes)
  33.     (set nope no)
  34.     (set is_a_file 1)
  35.     (set is_a_dir 2)
  36.     (set quote "\"")
  37.     (set newline "\n")
  38.     (set nothing "")
  39.     (set testing nope)
  40. ;    (set testing yep) ;<- uncomment this for testing mode
  41.     (set os2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
  42.     (set resident_candolib (getversion "cando.library" (resident)))
  43.     (set ntsc_mode false)
  44.     (set pal_mode true)
  45.     (set free-mem (+ (database "total-mem") 0)) ; leftover free ram
  46.  
  47. ; set up our delete options
  48.     (delopts "AskUser" "OkNoDelete" "Force")
  49.  
  50. ; some useful procedures
  51.  
  52. ; some overused strings
  53.     (set omp (cat "One moment please..." newline))
  54.     (set pci "Patching the copied icons.")
  55.  
  56. ; a general purpose global error trapper
  57.     (onerror
  58.         (makeassign "Workbench_Master" (safe))
  59.         (makeassign "CanDoProgram_Master" (safe))
  60.     )
  61.  
  62.     
  63. ;****************************************
  64. ;***** FIGURE OUT WHERE STUFF GOES ******
  65. ;****************************************
  66.  
  67. ; introduce our selfs to the viewers
  68.     (welcome "Welcome to the CanDo 1.60 boot disk update program.  This program uses "
  69.         "the Commodore Amiga Installer.  All of our future new products "
  70.         "will be using this installer and we would love to get any feedback "
  71.         "that might help in improving the installation procedure." newline newline
  72.     )
  73.  
  74. ;*******************************************
  75. ;***** GET CANDO PROGRAM DISK IN HERE ******
  76. ;*******************************************
  77.  
  78. ; ask for the first disk, it should be here but lets check anyway
  79.     (askdisk
  80.         (prompt    "Please insert the disk labeled " quote "CanDo Program" quote ".")
  81.         (help    "The CanDo Program disk contains 1.3 system software.")
  82.         (dest  "CanDo")
  83.         (newname "CanDoProgram_Master")
  84.     )
  85.  
  86. ; tell the user of our progress
  87.     (complete 5)
  88.  
  89. ; make sure that default-dir is pointing to the right place
  90.     (set @default-dest "CanDo:")
  91.  
  92.  
  93. ;***************************************
  94. ;***** GET WORKBENCH DISK IN HERE ******
  95. ;***************************************
  96.  
  97. ; ask for the workbench disk.
  98.     (askdisk
  99.         (prompt    "Please insert the 2.0x " quote "Workbench" quote
  100.             " disk into your other diskdrive."
  101.         )
  102.         (help    "The Workbench disk contains 2.0x system software.")
  103.         (dest  "Workbench")
  104.         (newname "Workbench_Master")
  105.     )
  106.  
  107. ; tell the user of our progress
  108.     (complete 10)
  109.  
  110.  
  111. ;*******************************
  112. ;***** UPDATE C: DIRECTORY *****
  113. ;*******************************
  114.  
  115. ; first copy over the new c: stuff
  116.     (working omp "Scanning for new C: files on Workbench.")
  117.     
  118.     (copyfiles
  119.         (prompt "Copying 2.0x Workbench's C: files needed by CanDo")
  120.         (help "This will copy various C: files to the CanDo Program disk."
  121.             newline
  122.             newline
  123.             @copyfiles-help
  124.         )
  125.         (source "Workbench_Master:C")
  126.         (dest "CanDo:C")
  127.         ; files needed "AddBuffers,Assign,BindDrivers,Copy,Delete,
  128.         ;               Dir,Execute,List,LoadWB,SetPatch"
  129.         (pattern "(AddB|Ass|BindD|Copy|Del|Dir|Exec|List|LoadWB|SetPatch)#?")
  130.         (files)
  131.         (confirm)
  132.     )
  133.     
  134. ; tell the user of our progress
  135.     (complete 15)
  136.  
  137. ; then copy over additional files
  138.     (working omp "Scanning for additional C: files on Workbench.")
  139.     
  140.     (copyfiles
  141.         (prompt "Copying additional 2.0x Workbench's C: files needed by CanDo")
  142.         (help "This will copy various C: files to the CanDo Program disk."
  143.             newline
  144.             newline
  145.             @copyfiles-help
  146.         )
  147.         (source "Workbench_Master:C")
  148.         (dest "CanDo:C")
  149.         ; files needed "Version|SetClock|MakeDir|IPrefs|Wait
  150.         (pattern "(Vers|SetClock|MakeDir|IPrefs|Wait)#?")
  151.         (files)
  152.         (confirm)
  153.     )
  154.     
  155. ; tell the user of our progress
  156.     (complete 20)
  157.  
  158. ; delete out of date stuff
  159.     (working omp "Deleting some out of date C: files from the CanDo Program disk.")
  160.     
  161.     ; files to be deleted "CD,Echo,EndCli,FF,NewCLI,Path,Run,Stack"
  162.     (delete "CanDo:C/CD")
  163.     (delete "CanDo:C/Echo")
  164.     (delete "CanDo:C/EndCLI")
  165.     (delete "CanDo:C/FF")
  166.     (delete "CanDo:C/NewCLI")
  167.     (delete "CanDo:C/Path")
  168.     (delete "CanDo:C/Run")
  169.     (delete "CanDo:C/Stack")
  170.     
  171. ; tell the user of our progress
  172.     (complete 25)
  173.  
  174.     
  175. ;**********************************
  176. ;***** UPDATE DEVS: DIRECTORY *****
  177. ;**********************************
  178.  
  179. ; first copy over the new devs: stuff
  180.     (working omp "Scanning for new Devs: files on Workbench.")
  181.     
  182.     (copyfiles
  183.         (prompt "Copying 2.0x Workbench's Devs: files needed by CanDo")
  184.         (help "This will copy various Devs: files to the CanDo Program disk."
  185.             newline
  186.             newline
  187.             @copyfiles-help
  188.         )
  189.         (source "Workbench_Master:Devs")
  190.         (dest "CanDo:Devs")
  191.         ; files needed "MountList, Parallel.Device, Printer.Device,
  192.         ;               Serial.Device and System-Configuration
  193.         (pattern "(Mount|Parall|Printer|Serial|System-Con)#?")
  194.         (files)
  195.         (confirm)
  196.     )
  197.     
  198. ; tell the user of our progress
  199.     (complete 30)
  200.  
  201. ; delete out of date stuff
  202.     (working omp "Deleting some out of date Devs: files from the CanDo Program disk.")
  203.     
  204.     ; first the usa1 keymap
  205.     (delete "CanDo:Devs/KeyMaps/usa1")
  206.     
  207.     ; second the clipboard directory
  208.     (delete "CanDo:ClipBoards")
  209.     
  210. ; tell the user of our progress
  211.     (complete 35)
  212.  
  213.     
  214. ;*******************************
  215. ;***** UPDATE L: DIRECTORY *****
  216. ;*******************************
  217.  
  218. ; first copy over the new l: stuff
  219.     (working omp "Scanning for new L: files on Workbench.")
  220.     
  221.     (copyfiles
  222.         (prompt "Copying 2.0x Workbench's L: files needed by CanDo")
  223.         (help "This will copy various L: files to the CanDo Program disk."
  224.             newline
  225.             newline
  226.             @copyfiles-help
  227.         )
  228.         (source "Workbench_Master:L")
  229.         (dest "CanDo:L")
  230.         ; files needed "Port-Handler"
  231.         (pattern "Port-Handler")
  232.         (files)
  233.         (confirm)
  234.     )
  235.     
  236. ; tell the user of our progress
  237.     (complete 40)
  238.  
  239. ; delete out of date stuff
  240.     (working omp "Deleting some out of date L: files from the CanDo Program disk.")
  241.     
  242.     ; handlers "Disk-Validator, FastFileSystem, Ram-Handler"
  243.     (delete "CanDo:L/Disk-Validator")
  244.     (delete "CanDo:L/FastFileSystem")
  245.     (delete "CanDo:L/Ram-Handler")
  246.     
  247. ; tell the user of our progress
  248.     (complete 45)
  249.  
  250.     
  251. ;**********************************
  252. ;***** UPDATE LIBS: DIRECTORY *****
  253. ;**********************************
  254.  
  255. ; first copy over the new libs: stuff
  256.     (working omp "Scanning for new Libs: files on Workbench.")
  257.     
  258.     (copyfiles
  259.         (prompt "Copying 2.0x Workbench's Libs: files needed by CanDo")
  260.         (help "This will copy various Libs: files to the CanDo Program disk."
  261.             newline
  262.             newline
  263.             @copyfiles-help
  264.         )
  265.         (source "Workbench_Master:Libs")
  266.         (dest "CanDo:Libs")
  267.         ; files needed "DiskFont.Library, Version.Library, MathTrans.Library,
  268.         ;               MathIEEEDoubBas.Library, MathIEEEDoubTrans.Library,
  269.         ;                IffParse and ASL"
  270.         (pattern "(DiskF|Vers|MathTr|MathIEEEDoub|Iff|Asl)#?")
  271.         (files)
  272.         (confirm)
  273.     )
  274.     
  275. ; tell the user of our progress
  276.     (complete 50)
  277.  
  278. ; delete out of date stuff
  279.     (working omp "Deleting some out of date Libs: files from the CanDo Program disk.")
  280.     
  281.     ; libraries "Icon.Library, Info.Library"
  282.     (delete "CanDo:Libs/Icon.Library")
  283.     (delete "CanDo:Libs/Info.Library")
  284.     
  285. ; tell the user of our progress
  286.     (complete 55)
  287.  
  288.     
  289. ;************************************
  290. ;***** UPDATE SYSTEM: DIRECTORY *****
  291. ;************************************
  292.  
  293. ; first copy over the new sys:system stuff
  294.     (working omp "Scanning for new System files on Workbench.")
  295.     
  296.     (copyfiles
  297.         (prompt "Copying 2.0x Workbench's System files needed by CanDo")
  298.         (help "This will copy various System files to the CanDo Program disk."
  299.             newline
  300.             newline
  301.             @copyfiles-help
  302.         )
  303.         (source "Workbench_Master:System")
  304.         (dest "CanDo:System")
  305.         ; files needed "CLI, DiskCopy, Format, BindMonitor"
  306.         (pattern "(CLI|DiskCopy|Format|BindMonitor)")
  307.         (infos)
  308.         (files)
  309.         (confirm)
  310.     )
  311.     
  312. ; tell the user of our progress
  313.     (complete 60)
  314.  
  315. ; delete out of date stuff
  316.     (working omp "Deleting some out of date System files from the CanDo Program disk.")
  317.     
  318.     ; file "SetMap" and its icon
  319.     (delete "CanDo:System/SetMap")
  320.     (delete "CanDo:System/SetMap.info")
  321.     
  322. ; tell the user of our progress
  323.     (complete 65)
  324.  
  325.     
  326. ;*******************************************
  327. ;***** CREATE/COPY WBSTARTUP DIRECTORY *****
  328. ;*******************************************
  329.  
  330. ; create the initial directory
  331.     (working omp "Creating WBStartup on the CanDo Program disk.")
  332.     
  333.     ; create the wbstartup directory
  334.     (makedir "CanDo:WBStartup"
  335.         (infos)
  336.     )
  337.  
  338. ; tell the user of our progress
  339.     (complete 70)
  340.     
  341.  
  342. ;****************************************
  343. ;***** CREATE/COPY ENVARC DIRECTORY *****
  344. ;****************************************
  345.  
  346. ; create the initial directory
  347.     (working omp "Creating default ENVARC drawer on the CanDo Program disk.")
  348.     
  349.     ; create the prefs directory
  350.     (makedir "CanDo:Prefs"
  351.         (infos)
  352.     )
  353.     
  354. ; tell the user of our progress
  355.     (complete 75)
  356.  
  357.     ; make presets and Env-Archive drawers
  358.     (set env_dir NOPE)
  359.     (if (= (exists "CanDo:Prefs") is_a_dir)
  360.         (
  361.             (copyfiles
  362.                 (prompt "Copying 2.0x Workbench preference files needed by CanDo")
  363.                 (help "This will copy various preference files to the CanDo Program disk."
  364.                     newline
  365.                     newline
  366.                     @copyfiles-help
  367.                 )
  368.                 (source "Workbench_Master:Prefs")
  369.                 (dest "CanDo:Prefs")
  370.                 ; directories needed "Presets and Env-Archive"
  371.                 (pattern "(Presets|Env-Archive)")
  372.                 (infos)
  373.                 (confirm)
  374.             )
  375.             (if (= (exists "CanDo:Prefs/Env-Archive") is_a_dir)
  376.                 (set env_dir YES)
  377.             )
  378.         )
  379.     )
  380.  
  381. ; tell the user of our progress
  382.     (complete 80)
  383.  
  384.  
  385. ;*******************************
  386. ;***** UPDATE S: DIRECTORY *****
  387. ;*******************************
  388.  
  389. ; delete out of date stuff
  390.     (working omp "Updating S: files on the CanDo Program disk.")
  391.     
  392.     ; rename file "Startup-Sequence"
  393.     (rename "CanDo:S/Startup-Sequence" "CanDo:S/Orig-Startup-Sequence")
  394.     
  395. ; tell the user of our progress
  396.     (complete 85)
  397.  
  398.     ; create a new Startup-Sequence
  399.     (working omp "Creating a new Startup-Sequence file.")
  400.     
  401.     (set temp
  402.         (cat
  403.             "Version >NIL:" newline
  404.             "FailAt 21" newline
  405.             "SetClock >NIL: load" newline
  406.         )
  407.     )
  408.     
  409.     (if (= env_dir YES)
  410.         (set temp
  411.             (cat
  412.                 temp
  413.                 "Copy >NIL: ENVARC: ram:env all quiet noreq" newline
  414.             )
  415.         )
  416.     )
  417.     
  418.     (set temp
  419.         (cat
  420.             temp
  421.             "MakeDir ram:T ram:ClipBoards" newline
  422.             "Assign T: Ram:T ;set up T: directory for scripts" newline
  423.             "Assign CLIPS: Ram:ClipBoards" newline
  424.             "If Exists Sys:Monitors" newline
  425.             "  List >T:mon-start Sys:Monitors/~#?.info lformat=\"Run >NIL: %s%s\"" newline
  426.             "  Execute T:mon-start" newline
  427.             "EndIf" newline
  428.             "Assign ENV: Ram:Env" newline
  429.             "Run >NIL: IPrefs >NIL:" newline
  430.             "Wait >NIL: 5" newline
  431.             "AddBuffers >NIL: DF0: 15" newline
  432.             "Echo \"CanDo Workbench Disk. 2.0 Release Version $Workbench\"" newline
  433.             "BindDrivers" newline
  434.             "SetEnv Workbench $Workbench" newline
  435.             "SetEnv Kickstart $Kickstart" newline
  436.             "Resident c:Execute pure add" newline
  437.             "Resident c:List pure add" newline
  438.             "Resident c:Assign pure add" newline
  439.             "Path Ram: C: Sys:Utilities Sys:System S: add" newline
  440.             "If Exists S:User-Startup" newline
  441.             "  Execute S:User-Startup" newline
  442.             "EndIf" newline
  443.             "LoadWB" newline
  444.             "EndCli >NIL:" newline
  445.         )
  446.     )
  447.     (textfile (dest "CanDo:S/Startup-Sequence")
  448.         (append temp)
  449.     )
  450.  
  451. ; tell the user of our progress
  452.     (complete 90)
  453.  
  454.  
  455. ;***************************************
  456. ;***** MAKE CANDO DISK A BOOT DISK *****
  457. ;***************************************
  458.  
  459. ; we don't know which disk cando is in so we cannot make it a 2.0 boot disk
  460. ;    (working omp "Installing 2.0 BootBlock on CanDo disk.")
  461. ;    
  462. ;    (set cando_device (figureout cando device))
  463. ;    (run "Workbench_Master:C/Install "||cando_device)
  464.  
  465.     (complete 95)
  466.  
  467. ;*****************************
  468. ;***** WE BE ALMOST DONE *****
  469. ;*****************************
  470.  
  471. ; make sure that default-dir is pointing to the right place
  472.     (set @default-dest "CanDo:")
  473.  
  474. ; unmake those three assignments
  475.     (makeassign "Workbench_Master" (safe))
  476.     (makeassign "CanDoProgram_Master" (safe))
  477.  
  478. ; tell the user of our progress
  479.     (complete 100)
  480.  
  481. ; final message for our viewers
  482.     (exit "The CanDo boot disk has now been updated to Workbench 2.0x.") ; altspace in name
  483.